package p.ithorns.integration.zk.id;

import lombok.Data;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * ZkProperties
 * TODO
 *
 * @author ithorns
 * @version 1.0
 * @date 2021/9/7 21:02
 */
@Data
//@Component
//@PropertySource("zk")
// ConfigurationProperties
public class ZkProperties {

    /**
     * zk服务端地址，多个","分隔
     */
    private String hosts = "10.1.7.77:2181";

    /**
     * 会话超时
     */
    private int sessionTimeout = 5000;

    /**
     * 连接超时
     */
    private int connTimeout = 5000;

    /**
     * 重试次数
     */
    private int retryTimes = 3;

    /**
     * 重试睡眠 ms
     */
    private int retrySleep = 1000;

    /**
     * 根路径
     */
    private String root = "/zk";
}
